import {addColumnEllipsis, dateRender} from "utils/common";

const columnWidth = 80;

let columns = [
  {
    dataIndex: "id",
    title: "ID",
    align: 'center',
    width: 50
  },
  {
    dataIndex: "userId",
    title: "会员ID",
    align: 'center',
    width: 80
  },
  {
    dataIndex: "username",
    title: "会员昵称",
    width: 150
  },
  {
    dataIndex: "mobile",
    title: "会员电话",
    align: "center",
    width: 120
  },
  {
    dataIndex: "goodsName",
    title: "商品名称"
  },
  {
    dataIndex: "images",
    title: "图片",
    width: 100,
    scopedSlots: { customRender: "imgs" },
    align: 'center'
  },
  {
    dataIndex: "goodsAttr",
    title: "规格"
  },
  {
    dataIndex: "cartQty",
    title: "数量",
    align: "center",
    width: 100
  },
  {
    dataIndex: "price",
    title: "单价(元)",
    align: "center",
    width: 100
  },
  {
    dataIndex: "createTime",
    align: "center",
    title: "创建时间",
    width: 140
  },
  // {
  //   dataIndex: "modifyTime",
  //   title: "变更时间"
  // },
  {
    dataIndex: "operation",
    title: "操作",
    scopedSlots: {customRender: "operation"},
    width: 80,
    align: "center",
    fixed: 'right'
  }
];

columns = addColumnEllipsis(columns);
export default columns;
